Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(chore) deprecate C-like #2954

Merged
merged 2 commits into from
Jan 19, 2021
Merged

Conversation

joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Jan 7, 2021

Deprecates c-like grammar (though still allows it's use) and copies
the contents fully into c and cpp grammars which will now diverge
as time goes on.

c still has auto-detect disabled at this point as it's just a clone
of cpp, but when someone is ready to simplify the c grammar tests
may be added and auto-detect may be turned back on.

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md
  • Added myself to AUTHORS.txt, under Contributors

@joshgoebel
Copy link
Member Author

joshgoebel commented Jan 7, 2021

This diff is huge but essentially it's just a few trivial things:

  • copy c-like into c.js (tweaking name and aliases)
  • copy c-like into cpp.js (tweaking name and aliases)
  • c.js has autoDetect: false still (see comment in PR main text)
  • c-like now depends on cpp (build time)
  • c-like attempt to see if c and cpp are loaded yet and if not will claim all C and C++ aliases for itself (to support users using it directly even though they should not be)
  • update c-like comments to explain the current situation

@joshgoebel
Copy link
Member Author

joshgoebel commented Jan 7, 2021

This work is to force the grammars to begin to diverge even if no one wants to put in the FULL time yet to make them perfect. c-like paved the way for this to happen (in v10) but did not actually encourage this to happen as patches just kept changing c-like.

@joshgoebel joshgoebel merged commit 871c00b into highlightjs:master Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants